/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __LED_H__
#define __LED_H__

/* Includes ------------------------------------------------------------------*/
#include "stm8s.h"
#include "define.h"

/* Exported types ------------------------------------------------------------*/
typedef enum _eOutput
{
    STATUS_LED,
    STATUS_BEEP,
    START_BUTTON,
    PAUSE_BUTTON
} eOutput;

/* Exported constants --------------------------------------------------------*/
#define STATUS_LED_PORT     (GPIOC)
#define STATUS_LED_PINS     (GPIO_PIN_3)

#if defined (DAU_MAY_1)
    #define STATUS_BEEP_PORT    (GPIOD)
    #define STATUS_BEEP_PINS    (GPIO_PIN_1)
#endif
#if defined (DAU_MAY_2)
    #define STATUS_BEEP_PORT    (GPIOC)
    #define STATUS_BEEP_PINS    (GPIO_PIN_4)
#endif

#define START_BUTTON_PORT         (GPIOD)
#define START_BUTTON_PINS         (GPIO_PIN_5)
#define PAUSE_BUTTON_PORT         (GPIOD)
#define PAUSE_BUTTON_PINS         (GPIO_PIN_6)
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void Led_Init(void);
void Led_SetOutput( eOutput iOutput, bool iOn );
void Led_InvOutput( eOutput iOutput );
void Beep_1(void);
void Beep_2(void);
void Beep_3(void);
void Beep_Long(void);
void Led_RunOne(void);

#endif /* __LED_H__ */

